This document was prepared on 2021-11-03.
library(tidyverse)
library(patchwork)
library(glmmTMB)
library(report)
library(parameters)
library(modelbased)
library(performance)
# library(bayestestR)
# library(see)
summary(report::report(sessionInfo()))The analysis was done using the R Statistical language (v4.1.0; R Core Team, 2021) on Windows 10 x64, using the packages ggplot2 (v3.3.5), stringr (v1.4.0), forcats (v0.5.1), tidyr (v1.1.3), readr (v1.4.0), dplyr (v1.0.6), tibble (v3.1.2), purrr (v0.3.4), parameters (v0.14.0.2), performance (v0.7.3.1), modelbased (v0.9.0), report (v0.3.5), glmmTMB (v1.1.2.3), patchwork (v1.1.1) and tidyverse (v1.3.1).
setwd("C:/Users/user/Desktop/Sputnik/2019-23/DeceptionInteroTom")
df <- read.csv("data/data_combined.csv") %>%
mutate(ID = as.factor(ID),
condition = as.factor(condition),
item = as.factor(item),
style = as.factor(style),
instruction = as.factor(instruction))
cat(paste("The data consists of",
report::report_participants(df,
participants = "ID",
sex = "Gender",
age = "Age")))The data consists of 30 participants (Mean age = 21.1, SD = 2.1, range: [18, 25]; 63.3% females)
Note that the chunks generating figures in the code below have some arguments specified in their header, such as fig.width and fig.height, which controls the figure size. These were filled with an eponym argument defined in utils/config.R. We also set the resolution, i.e., dpi, to a low value so that the resulting file is lighter. But don’t forget to crank this value up (to 300-600) to get nice-looking results.
df.plot <- df %>%
group_by(ID, condition, instruction) %>%
summarise(DT_confidence = mean(DT_confidence, na.rm = TRUE),
DT_RT = mean(DT_RT, na.rm = TRUE),
yoni_total = mean(yoni_total, na.rm = TRUE),
BES_total = mean(BES_total, na.rm = TRUE),
HCT_confidence = mean(HCT_confidence, na.rm = TRUE),
HCT_accuracy = mean(HCT_accuracy, na.rm = TRUE),
HCT_awareness = mean(HCT_awareness, na.rm = TRUE),
MAIA_total = mean(MAIA_total, na.rm = TRUE),
lie_ability = mean(lie_ability, na.rm = TRUE),
lie_frequency = mean(lie_frequency, na.rm = TRUE),
lie_negativity = mean(lie_negativity, na.rm = TRUE),
lie_contextuality = mean(lie_contextuality, na.rm = TRUE))p <- ggplot(df.plot, aes(yoni_total)) + geom_histogram()
q <- ggplot(df.plot, aes(BES_total)) + geom_histogram()
r <- ggplot(df.plot, aes(yoni_total, BES_total)) + geom_point()
s <- ggplot(df.plot, aes(HCT_accuracy)) + geom_histogram()
t <- ggplot(df.plot, aes(MAIA_total)) + geom_histogram()
u <- ggplot(df.plot, aes(HCT_accuracy, MAIA_total)) + geom_point()
(p + q + r)/(s + t + u) much higher confidence in truth no diff in reaction time in truth or lie not much diff for diff conditions
p <- ggplot(df, aes(DT_confidence)) + geom_density()
q <- ggplot(df, aes(DT_RT)) + geom_density()
r <- ggplot(df, aes(instruction, DT_confidence, fill = condition)) + geom_boxplot()
s <- ggplot(df, aes(instruction, DT_RT, fill = condition)) + geom_boxplot()
(p + q)/(r + s)interesting that the social tests are more correlated with polygraph and vice versa
both yoni and BES do not seem to have effect in social condition, higher yoni/BES increases confidence in truth and decreases confidences in lie
p <- ggplot(df.plot, aes(x = yoni_total, y = DT_confidence, colour = instruction)) +
geom_point() +
geom_smooth(method = "lm") +
facet_wrap(~condition)
q <- ggplot(df.plot, aes(x = BES_total, y = DT_confidence, colour = instruction)) +
geom_point() +
geom_smooth(method = "lm") +
facet_wrap(~condition)
p + qsame effect in both social and polygraph, higher HCT accuracy decreases confidence in truth and increases confidence in lie
ggplot(df.plot, aes(x = HCT_accuracy, y = DT_confidence, colour = instruction)) +
geom_point() +
geom_smooth(method = "lm") +
facet_wrap(~condition)same effect for lie in both social and polygraph, higher MAIA increases confidence higher MAIA increases confidence in lie for social and not polygraph
ggplot(df.plot, aes(x = MAIA_total, y = DT_confidence, colour = instruction)) +
geom_point() +
geom_smooth(method = "lm") +
facet_wrap(~condition)plot_expt <- function(model, var){
means <- estimate_means(model, at = c(var, "instruction"))
ggplot(means, aes_string(x = "instruction", y = "Mean", colour = var)) +
geom_line(aes_string(group = var)) +
geom_pointrange(aes(ymin = CI_low, ymax= CI_high))
}Confidence has a significant impact on RT. Increased confidence decreases RT.
model <- glmmTMB(DT_confidence ~ DT_RT + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")| Parameter | Coefficient | SE | CI | CI_low | CI_high | z | df_error | p | Effects |
|---|---|---|---|---|---|---|---|---|---|
| (Intercept) | 0.66 | 0.03 | 0.95 | 0.60 | 0.71 | 22.6 | Inf | 0.00 | fixed |
| DT_RT | -0.01 | 0.01 | 0.95 | -0.03 | 0.00 | -2.8 | Inf | 0.01 | fixed |
viz_data <- estimate_relation(model)
ggplot(data = viz_data, aes(x = DT_RT, y = Predicted)) +
geom_point(data = df, aes(x = DT_RT, y = DT_confidence, color = ID), show.legend = FALSE) +
geom_line() +
geom_ribbon(aes(ymin = CI_low, ymax = CI_high), alpha = 0.3)There is a significant interaction of condition and instruction on confidence. The increase in confidence from lie to truth is more in polygraph than social.
model <- glmmTMB(DT_confidence ~ condition*instruction + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")| Parameter | Coefficient | SE | CI | CI_low | CI_high | z | df_error | p | Effects |
|---|---|---|---|---|---|---|---|---|---|
| (Intercept) | 0.42 | 0.02 | 0.95 | 0.38 | 0.46 | 19.50 | Inf | 0.00 | fixed |
| conditionSocial | 0.01 | 0.02 | 0.95 | -0.02 | 0.04 | 0.74 | Inf | 0.46 | fixed |
| instructionTRUTH | 0.36 | 0.02 | 0.95 | 0.33 | 0.40 | 22.04 | Inf | 0.00 | fixed |
| conditionSocial:instructionTRUTH | -0.05 | 0.02 | 0.95 | -0.10 | -0.01 | -2.32 | Inf | 0.02 | fixed |
plot_expt(model, "condition")There is no significant interaction of style and instruction on confidence.
model <- glmmTMB(DT_confidence ~ style*instruction + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")| Parameter | Coefficient | SE | CI | CI_low | CI_high | z | df_error | p | Effects |
|---|---|---|---|---|---|---|---|---|---|
| (Intercept) | 0.43 | 0.02 | 0.95 | 0.39 | 0.48 | 20.11 | Inf | 0.00 | fixed |
| styleIndirect | -0.01 | 0.02 | 0.95 | -0.05 | 0.02 | -0.90 | Inf | 0.37 | fixed |
| instructionTRUTH | 0.34 | 0.02 | 0.95 | 0.30 | 0.37 | 20.27 | Inf | 0.00 | fixed |
| styleIndirect:instructionTRUTH | 0.00 | 0.02 | 0.95 | -0.04 | 0.05 | 0.09 | Inf | 0.93 | fixed |
plot_expt(model, "style")There is no significant interaction of condition and instruction on RT.
model <- glmmTMB(DT_RT ~ condition*instruction + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")| Parameter | Coefficient | SE | CI | CI_low | CI_high | z | df_error | p | Effects |
|---|---|---|---|---|---|---|---|---|---|
| (Intercept) | 4.33 | 0.21 | 0.95 | 3.91 | 4.74 | 20.53 | Inf | 0.00 | fixed |
| conditionSocial | -0.41 | 0.07 | 0.95 | -0.54 | -0.28 | -6.10 | Inf | 0.00 | fixed |
| instructionTRUTH | 0.08 | 0.07 | 0.95 | -0.05 | 0.21 | 1.19 | Inf | 0.23 | fixed |
| conditionSocial:instructionTRUTH | -0.02 | 0.10 | 0.95 | -0.20 | 0.17 | -0.19 | Inf | 0.85 | fixed |
plot_expt(model, "condition")There is no significant interaction of style and instruction on RT. Indirect style significantly increases RT.
model <- glmmTMB(DT_RT ~ style*instruction + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")| Parameter | Coefficient | SE | CI | CI_low | CI_high | z | df_error | p | Effects |
|---|---|---|---|---|---|---|---|---|---|
| (Intercept) | 3.96 | 0.21 | 0.95 | 3.54 | 4.37 | 18.77 | Inf | 0.00 | fixed |
| styleIndirect | 0.33 | 0.07 | 0.95 | 0.20 | 0.46 | 4.91 | Inf | 0.00 | fixed |
| instructionTRUTH | 0.02 | 0.07 | 0.95 | -0.11 | 0.15 | 0.28 | Inf | 0.78 | fixed |
| styleIndirect:instructionTRUTH | 0.10 | 0.10 | 0.95 | -0.08 | 0.29 | 1.09 | Inf | 0.27 | fixed |
plot_expt(model, "style")Effect on confidence and RT
plot_behv <- function(model, varx, vary) {
viz_data <- estimate_relation(model, at = c("condition", varx, "instruction"))
ggplot(data = viz_data, aes_string(x = varx, y = "Predicted")) +
geom_point(data = df.plot, aes_string(y = vary, color = "condition"), show.legend = FALSE) +
geom_line(aes(color = condition)) +
geom_ribbon(aes(ymin = CI_low, ymax = CI_high, fill = condition), alpha = 0.3) +
facet_wrap(~instruction)
}summary <- data.frame("yoni", "decrease (trend)", "social", "increase (ns)", "ns")
names(summary) <- c("measure", "conf main effect (lie)", "conf interact", "RT main effect (lie)", "RT interact")
summary <- summary %>%
rbind(c("BES", "decrease (ns)", "social (trend)", "decrease (ns)", "polygraph")) %>%
rbind(c("HCT confidence", "increase", "polygraph", "decrease", "ns")) %>%
rbind(c("HCT accuracy", "increase", "polygraph", "decrease (ns)", "ns")) %>%
rbind(c("HCT awareness", "decrease", "social", "increase", "polygraph")) %>%
rbind(c("MAIA", "increase", "ns", "decrease", "social"))
summary| measure | conf main effect (lie) | conf interact | RT main effect (lie) | RT interact |
|---|---|---|---|---|
| yoni | decrease (trend) | social | increase (ns) | ns |
| BES | decrease (ns) | social (trend) | decrease (ns) | polygraph |
| HCT confidence | increase | polygraph | decrease | ns |
| HCT accuracy | increase | polygraph | decrease (ns) | ns |
| HCT awareness | decrease | social | increase | polygraph |
| MAIA | increase | ns | decrease | social |
When instructed to lie, the decrease in confidence in participants with higher yoni score is less in social than polygraph condition.
model <- glmmTMB(DT_confidence ~ instruction/(condition*yoni_total) + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")| Parameter | Coefficient | SE | CI | CI_low | CI_high | z | df_error | p | Effects |
|---|---|---|---|---|---|---|---|---|---|
| (Intercept) | 0.85 | 0.24 | 0.95 | 0.37 | 1.32 | 3.5 | Inf | 0.00 | fixed |
| instructionTRUTH | -0.43 | 0.19 | 0.95 | -0.80 | -0.07 | -2.3 | Inf | 0.02 | fixed |
| instructionLIE:conditionSocial | -0.36 | 0.19 | 0.95 | -0.73 | 0.01 | -1.9 | Inf | 0.05 | fixed |
| instructionTRUTH:conditionSocial | 0.29 | 0.19 | 0.95 | -0.07 | 0.66 | 1.6 | Inf | 0.11 | fixed |
| instructionLIE:yoni_total | -0.01 | 0.00 | 0.95 | -0.01 | 0.00 | -1.8 | Inf | 0.08 | fixed |
| instructionTRUTH:yoni_total | 0.00 | 0.00 | 0.95 | 0.00 | 0.01 | 1.5 | Inf | 0.13 | fixed |
| instructionLIE:conditionSocial:yoni_total | 0.00 | 0.00 | 0.95 | 0.00 | 0.01 | 2.0 | Inf | 0.05 | fixed |
| instructionTRUTH:conditionSocial:yoni_total | 0.00 | 0.00 | 0.95 | -0.01 | 0.00 | -1.8 | Inf | 0.07 | fixed |
plot_behv(model, "yoni_total", "DT_confidence")When instructed to lie, participants with higher yoni score show no significant difference in RT between social and polygraph condition.
model <- glmmTMB(DT_RT ~ instruction/(condition*yoni_total) + style + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")| Parameter | Coefficient | SE | CI | CI_low | CI_high | z | df_error | p | Effects |
|---|---|---|---|---|---|---|---|---|---|
| (Intercept) | 1.18 | 2.13 | 0.95 | -3.00 | 5.36 | 0.55 | Inf | 0.58 | fixed |
| instructionTRUTH | 2.70 | 0.72 | 0.95 | 1.30 | 4.11 | 3.77 | Inf | 0.00 | fixed |
| styleIndirect | 0.40 | 0.05 | 0.95 | 0.30 | 0.49 | 8.46 | Inf | 0.00 | fixed |
| instructionLIE:conditionSocial | 0.70 | 0.72 | 0.95 | -0.70 | 2.11 | 0.98 | Inf | 0.33 | fixed |
| instructionTRUTH:conditionSocial | -1.85 | 0.72 | 0.95 | -3.25 | -0.44 | -2.58 | Inf | 0.01 | fixed |
| instructionLIE:yoni_total | 0.03 | 0.02 | 0.95 | -0.01 | 0.08 | 1.39 | Inf | 0.16 | fixed |
| instructionTRUTH:yoni_total | 0.00 | 0.02 | 0.95 | -0.04 | 0.05 | 0.16 | Inf | 0.87 | fixed |
| instructionLIE:conditionSocial:yoni_total | -0.01 | 0.01 | 0.95 | -0.03 | 0.00 | -1.56 | Inf | 0.12 | fixed |
| instructionTRUTH:conditionSocial:yoni_total | 0.02 | 0.01 | 0.95 | 0.00 | 0.03 | 1.95 | Inf | 0.05 | fixed |
plot_behv(model, "yoni_total", "DT_RT")When instructed to lie, the decrease in confidence in participants with higher BES score has a trend towards being less in social than polygraph condition.
model <- glmmTMB(DT_confidence ~ instruction/(condition*BES_total) + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")| Parameter | Coefficient | SE | CI | CI_low | CI_high | z | df_error | p | Effects |
|---|---|---|---|---|---|---|---|---|---|
| (Intercept) | 0.70 | 0.19 | 0.95 | 0.32 | 1.08 | 3.64 | Inf | 0.00 | fixed |
| instructionTRUTH | -0.15 | 0.15 | 0.95 | -0.43 | 0.14 | -0.99 | Inf | 0.32 | fixed |
| instructionLIE:conditionSocial | -0.23 | 0.15 | 0.95 | -0.52 | 0.06 | -1.58 | Inf | 0.11 | fixed |
| instructionTRUTH:conditionSocial | 0.14 | 0.15 | 0.95 | -0.14 | 0.43 | 0.98 | Inf | 0.33 | fixed |
| instructionLIE:BES_total | 0.00 | 0.00 | 0.95 | -0.01 | 0.00 | -1.47 | Inf | 0.14 | fixed |
| instructionTRUTH:BES_total | 0.00 | 0.00 | 0.95 | 0.00 | 0.01 | 1.18 | Inf | 0.24 | fixed |
| instructionLIE:conditionSocial:BES_total | 0.00 | 0.00 | 0.95 | 0.00 | 0.01 | 1.67 | Inf | 0.09 | fixed |
| instructionTRUTH:conditionSocial:BES_total | 0.00 | 0.00 | 0.95 | -0.01 | 0.00 | -1.27 | Inf | 0.20 | fixed |
plot_behv(model, "BES_total", "DT_confidence")When instructed to lie, the decrease in RT in participants with higher BES score is more in social than polygraph condition.
model <- glmmTMB(DT_RT ~ instruction/(condition*BES_total) + style + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")| Parameter | Coefficient | SE | CI | CI_low | CI_high | z | df_error | p | Effects |
|---|---|---|---|---|---|---|---|---|---|
| (Intercept) | 4.53 | 1.76 | 0.95 | 1.07 | 7.99 | 2.57 | Inf | 0.01 | fixed |
| instructionTRUTH | 1.40 | 0.59 | 0.95 | 0.23 | 2.56 | 2.35 | Inf | 0.02 | fixed |
| styleIndirect | 0.40 | 0.05 | 0.95 | 0.31 | 0.49 | 8.59 | Inf | 0.00 | fixed |
| instructionLIE:conditionSocial | 1.71 | 0.59 | 0.95 | 0.55 | 2.88 | 2.88 | Inf | 0.00 | fixed |
| instructionTRUTH:conditionSocial | 0.04 | 0.59 | 0.95 | -1.12 | 1.21 | 0.07 | Inf | 0.94 | fixed |
| instructionLIE:BES_total | -0.01 | 0.02 | 0.95 | -0.05 | 0.04 | -0.23 | Inf | 0.82 | fixed |
| instructionTRUTH:BES_total | -0.02 | 0.02 | 0.95 | -0.07 | 0.02 | -0.97 | Inf | 0.33 | fixed |
| instructionLIE:conditionSocial:BES_total | -0.03 | 0.01 | 0.95 | -0.04 | -0.01 | -3.60 | Inf | 0.00 | fixed |
| instructionTRUTH:conditionSocial:BES_total | -0.01 | 0.01 | 0.95 | -0.02 | 0.01 | -0.84 | Inf | 0.40 | fixed |
plot_behv(model, "BES_total", "DT_RT")When instructed to lie, the increase in confidence in participants with higher HCT confidence is more in polygraph than social condition.
model <- glmmTMB(DT_confidence ~ instruction/(condition*HCT_confidence) + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")| Parameter | Coefficient | SE | CI | CI_low | CI_high | z | df_error | p | Effects |
|---|---|---|---|---|---|---|---|---|---|
| (Intercept) | 0.29 | 0.04 | 0.95 | 0.21 | 0.38 | 6.60 | Inf | 0.00 | fixed |
| instructionTRUTH | 0.48 | 0.04 | 0.95 | 0.41 | 0.55 | 13.47 | Inf | 0.00 | fixed |
| instructionLIE:conditionSocial | 0.09 | 0.04 | 0.95 | 0.02 | 0.16 | 2.42 | Inf | 0.02 | fixed |
| instructionTRUTH:conditionSocial | -0.11 | 0.04 | 0.95 | -0.18 | -0.04 | -3.14 | Inf | 0.00 | fixed |
| instructionLIE:HCT_confidence | 0.25 | 0.08 | 0.95 | 0.10 | 0.41 | 3.20 | Inf | 0.00 | fixed |
| instructionTRUTH:HCT_confidence | 0.02 | 0.08 | 0.95 | -0.14 | 0.17 | 0.21 | Inf | 0.83 | fixed |
| instructionLIE:conditionSocial:HCT_confidence | -0.15 | 0.06 | 0.95 | -0.27 | -0.02 | -2.34 | Inf | 0.02 | fixed |
| instructionTRUTH:conditionSocial:HCT_confidence | 0.14 | 0.06 | 0.95 | 0.02 | 0.26 | 2.22 | Inf | 0.03 | fixed |
plot_behv(model, "HCT_confidence", "DT_confidence")When instructed to lie, participants with higher HCT confidence show no significant difference in RT between social and polygraph condition.
model <- glmmTMB(DT_RT ~ instruction/(condition*HCT_confidence) + style + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")| Parameter | Coefficient | SE | CI | CI_low | CI_high | z | df_error | p | Effects |
|---|---|---|---|---|---|---|---|---|---|
| (Intercept) | 5.18 | 0.44 | 0.95 | 4.32 | 6.03 | 11.84 | Inf | 0.00 | fixed |
| instructionTRUTH | 0.09 | 0.15 | 0.95 | -0.21 | 0.39 | 0.61 | Inf | 0.54 | fixed |
| styleIndirect | 0.40 | 0.05 | 0.95 | 0.30 | 0.49 | 8.17 | Inf | 0.00 | fixed |
| instructionLIE:conditionSocial | -0.67 | 0.15 | 0.95 | -0.97 | -0.37 | -4.39 | Inf | 0.00 | fixed |
| instructionTRUTH:conditionSocial | -0.52 | 0.15 | 0.95 | -0.82 | -0.22 | -3.43 | Inf | 0.00 | fixed |
| instructionLIE:HCT_confidence | -1.79 | 0.75 | 0.95 | -3.25 | -0.33 | -2.40 | Inf | 0.02 | fixed |
| instructionTRUTH:HCT_confidence | -1.86 | 0.75 | 0.95 | -3.32 | -0.40 | -2.49 | Inf | 0.01 | fixed |
| instructionLIE:conditionSocial:HCT_confidence | 0.34 | 0.26 | 0.95 | -0.18 | 0.85 | 1.27 | Inf | 0.20 | fixed |
| instructionTRUTH:conditionSocial:HCT_confidence | 0.10 | 0.26 | 0.95 | -0.41 | 0.62 | 0.38 | Inf | 0.70 | fixed |
plot_behv(model, "HCT_confidence", "DT_RT")When instructed to lie, the increase in confidence in participants with higher HCT accuracy is more in polygraph than social condition.
model <- glmmTMB(DT_confidence ~ instruction/(condition*HCT_accuracy) + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")| Parameter | Coefficient | SE | CI | CI_low | CI_high | z | df_error | p | Effects |
|---|---|---|---|---|---|---|---|---|---|
| (Intercept) | 0.22 | 0.07 | 0.95 | 0.08 | 0.35 | 3.2 | Inf | 0.00 | fixed |
| instructionTRUTH | 0.71 | 0.05 | 0.95 | 0.61 | 0.81 | 13.9 | Inf | 0.00 | fixed |
| instructionLIE:conditionSocial | 0.13 | 0.05 | 0.95 | 0.03 | 0.23 | 2.6 | Inf | 0.01 | fixed |
| instructionTRUTH:conditionSocial | -0.09 | 0.05 | 0.95 | -0.19 | 0.01 | -1.8 | Inf | 0.06 | fixed |
| instructionLIE:HCT_accuracy | 0.34 | 0.10 | 0.95 | 0.13 | 0.54 | 3.2 | Inf | 0.00 | fixed |
| instructionTRUTH:HCT_accuracy | -0.23 | 0.10 | 0.95 | -0.43 | -0.02 | -2.2 | Inf | 0.03 | fixed |
| instructionLIE:conditionSocial:HCT_accuracy | -0.20 | 0.08 | 0.95 | -0.35 | -0.04 | -2.5 | Inf | 0.01 | fixed |
| instructionTRUTH:conditionSocial:HCT_accuracy | 0.09 | 0.08 | 0.95 | -0.07 | 0.24 | 1.1 | Inf | 0.28 | fixed |
plot_behv(model, "HCT_accuracy", "DT_confidence")When instructed to lie, participants with higher HCT accuracy show no significant difference in RT between social and polygraph condition.
model <- glmmTMB(DT_RT ~ instruction/(condition*HCT_accuracy) + style + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")| Parameter | Coefficient | SE | CI | CI_low | CI_high | z | df_error | p | Effects |
|---|---|---|---|---|---|---|---|---|---|
| (Intercept) | 4.64 | 0.67 | 0.95 | 3.33 | 5.95 | 6.95 | Inf | 0.00 | fixed |
| instructionTRUTH | -0.22 | 0.22 | 0.95 | -0.66 | 0.21 | -1.00 | Inf | 0.32 | fixed |
| styleIndirect | 0.40 | 0.05 | 0.95 | 0.31 | 0.49 | 8.52 | Inf | 0.00 | fixed |
| instructionLIE:conditionSocial | -0.41 | 0.22 | 0.95 | -0.85 | 0.03 | -1.85 | Inf | 0.06 | fixed |
| instructionTRUTH:conditionSocial | -0.34 | 0.22 | 0.95 | -0.78 | 0.09 | -1.55 | Inf | 0.12 | fixed |
| instructionLIE:HCT_accuracy | -0.82 | 1.02 | 0.95 | -2.82 | 1.17 | -0.81 | Inf | 0.42 | fixed |
| instructionTRUTH:HCT_accuracy | -0.32 | 1.02 | 0.95 | -2.32 | 1.68 | -0.31 | Inf | 0.75 | fixed |
| instructionLIE:conditionSocial:HCT_accuracy | 0.00 | 0.34 | 0.95 | -0.67 | 0.67 | -0.01 | Inf | 0.99 | fixed |
| instructionTRUTH:conditionSocial:HCT_accuracy | -0.18 | 0.34 | 0.95 | -0.85 | 0.49 | -0.52 | Inf | 0.60 | fixed |
plot_behv(model, "HCT_accuracy", "DT_RT")When instructed to lie, participants with higher HCT awareness have higher confidence in social than polygraph condition.
model <- glmmTMB(DT_confidence ~ instruction/(condition*HCT_awareness) + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")| Parameter | Coefficient | SE | CI | CI_low | CI_high | z | df_error | p | Effects |
|---|---|---|---|---|---|---|---|---|---|
| (Intercept) | 0.42 | 0.02 | 0.95 | 0.37 | 0.46 | 19.27 | Inf | 0.00 | fixed |
| instructionTRUTH | 0.37 | 0.02 | 0.95 | 0.34 | 0.40 | 22.42 | Inf | 0.00 | fixed |
| instructionLIE:conditionSocial | 0.02 | 0.02 | 0.95 | -0.01 | 0.05 | 1.13 | Inf | 0.26 | fixed |
| instructionTRUTH:conditionSocial | -0.04 | 0.02 | 0.95 | -0.07 | -0.01 | -2.52 | Inf | 0.01 | fixed |
| instructionLIE:HCT_awareness | -0.09 | 0.04 | 0.95 | -0.16 | -0.02 | -2.53 | Inf | 0.01 | fixed |
| instructionTRUTH:HCT_awareness | 0.01 | 0.04 | 0.95 | -0.06 | 0.08 | 0.32 | Inf | 0.75 | fixed |
| instructionLIE:conditionSocial:HCT_awareness | 0.13 | 0.03 | 0.95 | 0.08 | 0.19 | 4.79 | Inf | 0.00 | fixed |
| instructionTRUTH:conditionSocial:HCT_awareness | 0.01 | 0.03 | 0.95 | -0.04 | 0.07 | 0.43 | Inf | 0.67 | fixed |
plot_behv(model, "HCT_awareness", "DT_confidence")When instructed to lie, the increase in RT in participants with higher HCT awareness is less in social than polygraph condition. (Strange considering confidence increases)
model <- glmmTMB(DT_RT ~ instruction/(condition*HCT_awareness) + style + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")| Parameter | Coefficient | SE | CI | CI_low | CI_high | z | df_error | p | Effects |
|---|---|---|---|---|---|---|---|---|---|
| (Intercept) | 4.30 | 0.21 | 0.95 | 3.88 | 4.72 | 20.01 | Inf | 0.00 | fixed |
| instructionTRUTH | 0.05 | 0.07 | 0.95 | -0.09 | 0.18 | 0.69 | Inf | 0.49 | fixed |
| styleIndirect | 0.40 | 0.05 | 0.95 | 0.30 | 0.49 | 8.17 | Inf | 0.00 | fixed |
| instructionLIE:conditionSocial | -0.51 | 0.07 | 0.95 | -0.64 | -0.37 | -7.38 | Inf | 0.00 | fixed |
| instructionTRUTH:conditionSocial | -0.47 | 0.07 | 0.95 | -0.61 | -0.34 | -6.84 | Inf | 0.00 | fixed |
| instructionLIE:HCT_awareness | 0.86 | 0.34 | 0.95 | 0.19 | 1.53 | 2.50 | Inf | 0.01 | fixed |
| instructionTRUTH:HCT_awareness | 0.64 | 0.34 | 0.95 | -0.04 | 1.31 | 1.85 | Inf | 0.06 | fixed |
| instructionLIE:conditionSocial:HCT_awareness | -0.31 | 0.12 | 0.95 | -0.54 | -0.08 | -2.65 | Inf | 0.01 | fixed |
| instructionTRUTH:conditionSocial:HCT_awareness | -0.08 | 0.12 | 0.95 | -0.31 | 0.15 | -0.66 | Inf | 0.51 | fixed |
plot_behv(model, "HCT_awareness", "DT_RT")When instructed to lie, participants with higher MAIA score show no significant difference in confidence between social and polygraph condition.
model <- glmmTMB(DT_confidence ~ instruction/(condition*MAIA_total) + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")| Parameter | Coefficient | SE | CI | CI_low | CI_high | z | df_error | p | Effects |
|---|---|---|---|---|---|---|---|---|---|
| (Intercept) | 0.07 | 0.10 | 0.95 | -0.13 | 0.28 | 0.71 | Inf | 0.48 | fixed |
| instructionTRUTH | 0.67 | 0.08 | 0.95 | 0.51 | 0.84 | 7.96 | Inf | 0.00 | fixed |
| instructionLIE:conditionSocial | 0.15 | 0.08 | 0.95 | -0.02 | 0.32 | 1.76 | Inf | 0.08 | fixed |
| instructionTRUTH:conditionSocial | -0.22 | 0.08 | 0.95 | -0.39 | -0.05 | -2.60 | Inf | 0.01 | fixed |
| instructionLIE:MAIA_total | 0.13 | 0.04 | 0.95 | 0.05 | 0.20 | 3.41 | Inf | 0.00 | fixed |
| instructionTRUTH:MAIA_total | 0.01 | 0.04 | 0.95 | -0.06 | 0.09 | 0.34 | Inf | 0.73 | fixed |
| instructionLIE:conditionSocial:MAIA_total | -0.05 | 0.03 | 0.95 | -0.11 | 0.01 | -1.64 | Inf | 0.10 | fixed |
| instructionTRUTH:conditionSocial:MAIA_total | 0.07 | 0.03 | 0.95 | 0.01 | 0.13 | 2.15 | Inf | 0.03 | fixed |
plot_behv(model, "MAIA_total", "DT_confidence")When instructed to lie, the decrease in RT in participants with higher MAIA score is more in polygraph than social condition.
model <- glmmTMB(DT_RT ~ instruction/(condition*MAIA_total) + style + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")| Parameter | Coefficient | SE | CI | CI_low | CI_high | z | df_error | p | Effects |
|---|---|---|---|---|---|---|---|---|---|
| (Intercept) | 6.61 | 0.98 | 0.95 | 4.69 | 8.54 | 6.73 | Inf | 0.00 | fixed |
| instructionTRUTH | -0.03 | 0.35 | 0.95 | -0.71 | 0.65 | -0.09 | Inf | 0.93 | fixed |
| styleIndirect | 0.39 | 0.05 | 0.95 | 0.30 | 0.48 | 8.42 | Inf | 0.00 | fixed |
| instructionLIE:conditionSocial | -1.63 | 0.35 | 0.95 | -2.31 | -0.96 | -4.73 | Inf | 0.00 | fixed |
| instructionTRUTH:conditionSocial | -1.40 | 0.35 | 0.95 | -2.08 | -0.73 | -4.06 | Inf | 0.00 | fixed |
| instructionLIE:MAIA_total | -0.90 | 0.35 | 0.95 | -1.58 | -0.22 | -2.58 | Inf | 0.01 | fixed |
| instructionTRUTH:MAIA_total | -0.86 | 0.35 | 0.95 | -1.54 | -0.17 | -2.45 | Inf | 0.01 | fixed |
| instructionLIE:conditionSocial:MAIA_total | 0.44 | 0.12 | 0.95 | 0.20 | 0.68 | 3.60 | Inf | 0.00 | fixed |
| instructionTRUTH:conditionSocial:MAIA_total | 0.34 | 0.12 | 0.95 | 0.10 | 0.58 | 2.80 | Inf | 0.01 | fixed |
plot_behv(model, "MAIA_total", "DT_RT")Higher lie ability increases confidence more in lie than truth. When instructed to lie, participants with higher lie ability show no significant difference in confidence between social and polygraph condition.
model <- glmmTMB(DT_confidence ~ instruction/(condition*lie_ability) + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")| Parameter | Coefficient | SE | CI | CI_low | CI_high | z | df_error | p | Effects |
|---|---|---|---|---|---|---|---|---|---|
| (Intercept) | 0.43 | 0.02 | 0.95 | 0.39 | 0.47 | 21.30 | Inf | 0.00 | fixed |
| instructionTRUTH | 0.35 | 0.02 | 0.95 | 0.32 | 0.39 | 21.15 | Inf | 0.00 | fixed |
| instructionLIE:conditionSocial | 0.01 | 0.02 | 0.95 | -0.02 | 0.04 | 0.60 | Inf | 0.55 | fixed |
| instructionTRUTH:conditionSocial | -0.04 | 0.02 | 0.95 | -0.07 | -0.01 | -2.36 | Inf | 0.02 | fixed |
| instructionLIE:lie_ability | 0.01 | 0.00 | 0.95 | 0.01 | 0.02 | 3.42 | Inf | 0.00 | fixed |
| instructionTRUTH:lie_ability | 0.00 | 0.00 | 0.95 | -0.01 | 0.01 | 0.65 | Inf | 0.51 | fixed |
| instructionLIE:conditionSocial:lie_ability | 0.00 | 0.00 | 0.95 | -0.01 | 0.00 | -0.73 | Inf | 0.47 | fixed |
| instructionTRUTH:conditionSocial:lie_ability | 0.00 | 0.00 | 0.95 | 0.00 | 0.01 | 0.79 | Inf | 0.43 | fixed |
plot_behv(model, "lie_ability", "DT_confidence")When instructed to lie, participants with higher lie ability show no significant difference in RT between social and polygraph condition.
model <- glmmTMB(DT_RT ~ instruction/(condition*lie_ability) + style + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")| Parameter | Coefficient | SE | CI | CI_low | CI_high | z | df_error | p | Effects |
|---|---|---|---|---|---|---|---|---|---|
| (Intercept) | 4.12 | 0.21 | 0.95 | 3.70 | 4.53 | 19.47 | Inf | 0.00 | fixed |
| instructionTRUTH | 0.09 | 0.07 | 0.95 | -0.04 | 0.22 | 1.43 | Inf | 0.15 | fixed |
| styleIndirect | 0.40 | 0.05 | 0.95 | 0.30 | 0.49 | 8.44 | Inf | 0.00 | fixed |
| instructionLIE:conditionSocial | -0.40 | 0.07 | 0.95 | -0.53 | -0.27 | -6.10 | Inf | 0.00 | fixed |
| instructionTRUTH:conditionSocial | -0.45 | 0.07 | 0.95 | -0.58 | -0.32 | -6.72 | Inf | 0.00 | fixed |
| instructionLIE:lie_ability | -0.04 | 0.04 | 0.95 | -0.11 | 0.04 | -0.95 | Inf | 0.34 | fixed |
| instructionTRUTH:lie_ability | -0.03 | 0.04 | 0.95 | -0.10 | 0.04 | -0.79 | Inf | 0.43 | fixed |
| instructionLIE:conditionSocial:lie_ability | 0.02 | 0.01 | 0.95 | -0.01 | 0.04 | 1.44 | Inf | 0.15 | fixed |
| instructionTRUTH:conditionSocial:lie_ability | 0.02 | 0.01 | 0.95 | -0.01 | 0.04 | 1.37 | Inf | 0.17 | fixed |
plot_behv(model, "lie_ability", "DT_RT")When instructed to lie, participants with higher lie frequency show no significant difference in confidence between social and polygraph condition.
model <- glmmTMB(DT_confidence ~ instruction/(condition*lie_frequency) + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")| Parameter | Coefficient | SE | CI | CI_low | CI_high | z | df_error | p | Effects |
|---|---|---|---|---|---|---|---|---|---|
| (Intercept) | 0.41 | 0.03 | 0.95 | 0.36 | 0.46 | 16.32 | Inf | 0.00 | fixed |
| instructionTRUTH | 0.38 | 0.02 | 0.95 | 0.35 | 0.42 | 19.85 | Inf | 0.00 | fixed |
| instructionLIE:conditionSocial | 0.01 | 0.02 | 0.95 | -0.03 | 0.04 | 0.34 | Inf | 0.74 | fixed |
| instructionTRUTH:conditionSocial | -0.04 | 0.02 | 0.95 | -0.08 | 0.00 | -2.00 | Inf | 0.05 | fixed |
| instructionLIE:lie_frequency | 0.00 | 0.00 | 0.95 | -0.01 | 0.01 | -0.47 | Inf | 0.64 | fixed |
| instructionTRUTH:lie_frequency | 0.01 | 0.00 | 0.95 | 0.00 | 0.01 | 1.11 | Inf | 0.27 | fixed |
| instructionLIE:conditionSocial:lie_frequency | 0.00 | 0.00 | 0.95 | -0.01 | 0.01 | -0.55 | Inf | 0.58 | fixed |
| instructionTRUTH:conditionSocial:lie_frequency | 0.00 | 0.00 | 0.95 | -0.01 | 0.01 | 0.29 | Inf | 0.77 | fixed |
plot_behv(model, "lie_frequency", "DT_confidence")Participants with higher lie frequency show significant increase in RT for both lie and truth. When instructed to lie, the increase in RT in participants with higher lie frequency is more in polygraph than social condition.
model <- glmmTMB(DT_RT ~ instruction/(condition*lie_frequency) + style + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")| Parameter | Coefficient | SE | CI | CI_low | CI_high | z | df_error | p | Effects |
|---|---|---|---|---|---|---|---|---|---|
| (Intercept) | 4.53 | 0.23 | 0.95 | 4.07 | 4.98 | 19.4 | Inf | 0.00 | fixed |
| instructionTRUTH | 0.19 | 0.08 | 0.95 | 0.04 | 0.34 | 2.5 | Inf | 0.01 | fixed |
| styleIndirect | 0.40 | 0.05 | 0.95 | 0.31 | 0.49 | 8.8 | Inf | 0.00 | fixed |
| instructionLIE:conditionSocial | -0.77 | 0.08 | 0.95 | -0.92 | -0.62 | -10.0 | Inf | 0.00 | fixed |
| instructionTRUTH:conditionSocial | -0.84 | 0.08 | 0.95 | -0.99 | -0.69 | -10.9 | Inf | 0.00 | fixed |
| instructionLIE:lie_frequency | 0.14 | 0.04 | 0.95 | 0.06 | 0.23 | 3.3 | Inf | 0.00 | fixed |
| instructionTRUTH:lie_frequency | 0.18 | 0.04 | 0.95 | 0.09 | 0.26 | 4.1 | Inf | 0.00 | fixed |
| instructionLIE:conditionSocial:lie_frequency | -0.13 | 0.02 | 0.95 | -0.16 | -0.10 | -8.4 | Inf | 0.00 | fixed |
| instructionTRUTH:conditionSocial:lie_frequency | -0.14 | 0.02 | 0.95 | -0.17 | -0.11 | -9.1 | Inf | 0.00 | fixed |
plot_behv(model, "lie_frequency", "DT_RT")When instructed to lie, participants with higher perception of lie negativity show no significant difference in confidence between social and polygraph condition.
model <- glmmTMB(DT_confidence ~ instruction/(condition*lie_negativity) + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")| Parameter | Coefficient | SE | CI | CI_low | CI_high | z | df_error | p | Effects |
|---|---|---|---|---|---|---|---|---|---|
| (Intercept) | 0.40 | 0.03 | 0.95 | 0.34 | 0.47 | 12.17 | Inf | 0.00 | fixed |
| instructionTRUTH | 0.39 | 0.03 | 0.95 | 0.34 | 0.44 | 15.52 | Inf | 0.00 | fixed |
| instructionLIE:conditionSocial | 0.00 | 0.03 | 0.95 | -0.05 | 0.05 | 0.16 | Inf | 0.88 | fixed |
| instructionTRUTH:conditionSocial | -0.03 | 0.03 | 0.95 | -0.08 | 0.02 | -1.14 | Inf | 0.25 | fixed |
| instructionLIE:lie_negativity | 0.00 | 0.01 | 0.95 | -0.01 | 0.02 | 0.69 | Inf | 0.49 | fixed |
| instructionTRUTH:lie_negativity | 0.00 | 0.01 | 0.95 | -0.02 | 0.01 | -0.47 | Inf | 0.64 | fixed |
| instructionLIE:conditionSocial:lie_negativity | 0.00 | 0.01 | 0.95 | -0.01 | 0.01 | 0.43 | Inf | 0.66 | fixed |
| instructionTRUTH:conditionSocial:lie_negativity | 0.00 | 0.01 | 0.95 | -0.01 | 0.01 | -0.67 | Inf | 0.50 | fixed |
plot_behv(model, "lie_negativity", "DT_confidence")Participants with higher perception of lie negativity show significant decrease in RT for both lie and truth. When instructed to lie, the decrease in RT in participants with higher perception of lie negativity is more in polygraph than social condition.
model <- glmmTMB(DT_RT ~ instruction/(condition*lie_negativity) + style + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")| Parameter | Coefficient | SE | CI | CI_low | CI_high | z | df_error | p | Effects |
|---|---|---|---|---|---|---|---|---|---|
| (Intercept) | 4.64 | 0.28 | 0.95 | 4.08 | 5.19 | 16.3 | Inf | 0.00 | fixed |
| instructionTRUTH | 0.11 | 0.09 | 0.95 | -0.07 | 0.29 | 1.2 | Inf | 0.24 | fixed |
| styleIndirect | 0.40 | 0.05 | 0.95 | 0.31 | 0.49 | 8.7 | Inf | 0.00 | fixed |
| instructionLIE:conditionSocial | -0.84 | 0.09 | 0.95 | -1.02 | -0.66 | -9.0 | Inf | 0.00 | fixed |
| instructionTRUTH:conditionSocial | -0.83 | 0.09 | 0.95 | -1.01 | -0.65 | -8.8 | Inf | 0.00 | fixed |
| instructionLIE:lie_negativity | -0.15 | 0.06 | 0.95 | -0.26 | -0.04 | -2.6 | Inf | 0.01 | fixed |
| instructionTRUTH:lie_negativity | -0.16 | 0.06 | 0.95 | -0.27 | -0.04 | -2.7 | Inf | 0.01 | fixed |
| instructionLIE:conditionSocial:lie_negativity | 0.13 | 0.02 | 0.95 | 0.09 | 0.17 | 6.3 | Inf | 0.00 | fixed |
| instructionTRUTH:conditionSocial:lie_negativity | 0.11 | 0.02 | 0.95 | 0.07 | 0.15 | 5.6 | Inf | 0.00 | fixed |
plot_behv(model, "lie_negativity", "DT_RT")When instructed to lie, participants with higher lie contextuality show no significant difference in confidence between social and polygraph condition.
model <- glmmTMB(DT_confidence ~ instruction/(condition*lie_contextuality) + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")| Parameter | Coefficient | SE | CI | CI_low | CI_high | z | df_error | p | Effects |
|---|---|---|---|---|---|---|---|---|---|
| (Intercept) | 0.47 | 0.04 | 0.95 | 0.39 | 0.55 | 11.80 | Inf | 0.00 | fixed |
| instructionTRUTH | 0.32 | 0.03 | 0.95 | 0.26 | 0.38 | 10.25 | Inf | 0.00 | fixed |
| instructionLIE:conditionSocial | 0.00 | 0.03 | 0.95 | -0.07 | 0.06 | -0.12 | Inf | 0.90 | fixed |
| instructionTRUTH:conditionSocial | 0.01 | 0.03 | 0.95 | -0.05 | 0.07 | 0.38 | Inf | 0.70 | fixed |
| instructionLIE:lie_contextuality | -0.01 | 0.01 | 0.95 | -0.03 | 0.00 | -1.50 | Inf | 0.13 | fixed |
| instructionTRUTH:lie_contextuality | 0.00 | 0.01 | 0.95 | -0.02 | 0.01 | -0.24 | Inf | 0.81 | fixed |
| instructionLIE:conditionSocial:lie_contextuality | 0.00 | 0.01 | 0.95 | -0.01 | 0.02 | 0.60 | Inf | 0.55 | fixed |
| instructionTRUTH:conditionSocial:lie_contextuality | -0.01 | 0.01 | 0.95 | -0.02 | 0.00 | -2.03 | Inf | 0.04 | fixed |
plot_behv(model, "lie_contextuality", "DT_confidence")When instructed to lie, the decrease in RT in participants with higher lie contextuality is more in social than polygraph condition.
model <- glmmTMB(DT_RT ~ instruction/(condition*lie_contextuality) + style + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")| Parameter | Coefficient | SE | CI | CI_low | CI_high | z | df_error | p | Effects |
|---|---|---|---|---|---|---|---|---|---|
| (Intercept) | 4.04 | 0.39 | 0.95 | 3.28 | 4.80 | 10.45 | Inf | 0.00 | fixed |
| instructionTRUTH | 0.30 | 0.13 | 0.95 | 0.05 | 0.55 | 2.37 | Inf | 0.02 | fixed |
| styleIndirect | 0.41 | 0.05 | 0.95 | 0.32 | 0.50 | 8.76 | Inf | 0.00 | fixed |
| instructionLIE:conditionSocial | 0.21 | 0.13 | 0.95 | -0.04 | 0.46 | 1.68 | Inf | 0.09 | fixed |
| instructionTRUTH:conditionSocial | 0.06 | 0.13 | 0.95 | -0.18 | 0.31 | 0.51 | Inf | 0.61 | fixed |
| instructionLIE:lie_contextuality | 0.02 | 0.07 | 0.95 | -0.12 | 0.15 | 0.25 | Inf | 0.80 | fixed |
| instructionTRUTH:lie_contextuality | -0.03 | 0.07 | 0.95 | -0.16 | 0.11 | -0.39 | Inf | 0.70 | fixed |
| instructionLIE:conditionSocial:lie_contextuality | -0.13 | 0.02 | 0.95 | -0.18 | -0.09 | -5.75 | Inf | 0.00 | fixed |
| instructionTRUTH:conditionSocial:lie_contextuality | -0.11 | 0.02 | 0.95 | -0.16 | -0.07 | -4.77 | Inf | 0.00 | fixed |
plot_behv(model, "lie_contextuality", "DT_RT")The full script of executive code contained in this document is reproduced here.
# Set up the environment (or use local alternative `source("utils/config.R")`)
source("https://raw.githubusercontent.com/RealityBending/TemplateResults/main/utils/config.R")
fast <- FALSE # Make this false to skip the chunks
# This chunk is a bit complex so don't worry about it: it's made to add badges to the HTML versions
# NOTE: You have to replace the links accordingly to have working "buttons" on the HTML versions
if (!knitr::is_latex_output() && knitr::is_html_output()) {
cat("
[](https://github.com/RealityBending/TemplateResults)
[](https://realitybending.github.io/TemplateResults/)
[](https://github.com/RealityBending/TemplateResults/raw/main/word_and_pdf/SupplementaryMaterials.docx)
[](https://github.com/RealityBending/TemplateResults/blob/main/word_and_pdf/SupplementaryMaterials.pdf)")
}
library(tidyverse)
library(patchwork)
library(glmmTMB)
library(report)
library(parameters)
library(modelbased)
library(performance)
# library(bayestestR)
# library(see)
summary(report::report(sessionInfo()))
setwd("C:/Users/user/Desktop/Sputnik/2019-23/DeceptionInteroTom")
df <- read.csv("data/data_combined.csv") %>%
mutate(ID = as.factor(ID),
condition = as.factor(condition),
item = as.factor(item),
style = as.factor(style),
instruction = as.factor(instruction))
cat(paste("The data consists of",
report::report_participants(df,
participants = "ID",
sex = "Gender",
age = "Age")))
report::cite_packages(sessionInfo())
df.plot <- df %>%
group_by(ID, condition, instruction) %>%
summarise(DT_confidence = mean(DT_confidence, na.rm = TRUE),
DT_RT = mean(DT_RT, na.rm = TRUE),
yoni_total = mean(yoni_total, na.rm = TRUE),
BES_total = mean(BES_total, na.rm = TRUE),
HCT_confidence = mean(HCT_confidence, na.rm = TRUE),
HCT_accuracy = mean(HCT_accuracy, na.rm = TRUE),
HCT_awareness = mean(HCT_awareness, na.rm = TRUE),
MAIA_total = mean(MAIA_total, na.rm = TRUE),
lie_ability = mean(lie_ability, na.rm = TRUE),
lie_frequency = mean(lie_frequency, na.rm = TRUE),
lie_negativity = mean(lie_negativity, na.rm = TRUE),
lie_contextuality = mean(lie_contextuality, na.rm = TRUE))
p <- ggplot(df.plot, aes(yoni_total)) + geom_histogram()
q <- ggplot(df.plot, aes(BES_total)) + geom_histogram()
r <- ggplot(df.plot, aes(yoni_total, BES_total)) + geom_point()
s <- ggplot(df.plot, aes(HCT_accuracy)) + geom_histogram()
t <- ggplot(df.plot, aes(MAIA_total)) + geom_histogram()
u <- ggplot(df.plot, aes(HCT_accuracy, MAIA_total)) + geom_point()
(p + q + r)/(s + t + u)
p <- ggplot(df, aes(DT_confidence)) + geom_density()
q <- ggplot(df, aes(DT_RT)) + geom_density()
r <- ggplot(df, aes(instruction, DT_confidence, fill = condition)) + geom_boxplot()
s <- ggplot(df, aes(instruction, DT_RT, fill = condition)) + geom_boxplot()
(p + q)/(r + s)
p <- ggplot(df.plot, aes(x = yoni_total, y = DT_confidence, colour = instruction)) +
geom_point() +
geom_smooth(method = "lm") +
facet_wrap(~condition)
q <- ggplot(df.plot, aes(x = BES_total, y = DT_confidence, colour = instruction)) +
geom_point() +
geom_smooth(method = "lm") +
facet_wrap(~condition)
p + q
ggplot(df.plot, aes(x = HCT_accuracy, y = DT_confidence, colour = instruction)) +
geom_point() +
geom_smooth(method = "lm") +
facet_wrap(~condition)
ggplot(df.plot, aes(x = MAIA_total, y = DT_confidence, colour = instruction)) +
geom_point() +
geom_smooth(method = "lm") +
facet_wrap(~condition)
plot_expt <- function(model, var){
means <- estimate_means(model, at = c(var, "instruction"))
ggplot(means, aes_string(x = "instruction", y = "Mean", colour = var)) +
geom_line(aes_string(group = var)) +
geom_pointrange(aes(ymin = CI_low, ymax= CI_high))
}
model <- glmmTMB(DT_confidence ~ DT_RT + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")
viz_data <- estimate_relation(model)
ggplot(data = viz_data, aes(x = DT_RT, y = Predicted)) +
geom_point(data = df, aes(x = DT_RT, y = DT_confidence, color = ID), show.legend = FALSE) +
geom_line() +
geom_ribbon(aes(ymin = CI_low, ymax = CI_high), alpha = 0.3)
model <- glmmTMB(DT_confidence ~ condition*instruction + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")
plot_expt(model, "condition")
model <- glmmTMB(DT_confidence ~ style*instruction + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")
plot_expt(model, "style")
model <- glmmTMB(DT_RT ~ condition*instruction + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")
plot_expt(model, "condition")
model <- glmmTMB(DT_RT ~ style*instruction + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")
plot_expt(model, "style")
plot_behv <- function(model, varx, vary) {
viz_data <- estimate_relation(model, at = c("condition", varx, "instruction"))
ggplot(data = viz_data, aes_string(x = varx, y = "Predicted")) +
geom_point(data = df.plot, aes_string(y = vary, color = "condition"), show.legend = FALSE) +
geom_line(aes(color = condition)) +
geom_ribbon(aes(ymin = CI_low, ymax = CI_high, fill = condition), alpha = 0.3) +
facet_wrap(~instruction)
}
summary <- data.frame("yoni", "decrease (trend)", "social", "increase (ns)", "ns")
names(summary) <- c("measure", "conf main effect (lie)", "conf interact", "RT main effect (lie)", "RT interact")
summary <- summary %>%
rbind(c("BES", "decrease (ns)", "social (trend)", "decrease (ns)", "polygraph")) %>%
rbind(c("HCT confidence", "increase", "polygraph", "decrease", "ns")) %>%
rbind(c("HCT accuracy", "increase", "polygraph", "decrease (ns)", "ns")) %>%
rbind(c("HCT awareness", "decrease", "social", "increase", "polygraph")) %>%
rbind(c("MAIA", "increase", "ns", "decrease", "social"))
summary
model <- glmmTMB(DT_confidence ~ instruction/(condition*yoni_total) + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")
plot_behv(model, "yoni_total", "DT_confidence")
model <- glmmTMB(DT_RT ~ instruction/(condition*yoni_total) + style + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")
plot_behv(model, "yoni_total", "DT_RT")
model <- glmmTMB(DT_confidence ~ instruction/(condition*BES_total) + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")
plot_behv(model, "BES_total", "DT_confidence")
model <- glmmTMB(DT_RT ~ instruction/(condition*BES_total) + style + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")
plot_behv(model, "BES_total", "DT_RT")
model <- glmmTMB(DT_confidence ~ instruction/(condition*HCT_confidence) + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")
plot_behv(model, "HCT_confidence", "DT_confidence")
model <- glmmTMB(DT_RT ~ instruction/(condition*HCT_confidence) + style + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")
plot_behv(model, "HCT_confidence", "DT_RT")
model <- glmmTMB(DT_confidence ~ instruction/(condition*HCT_accuracy) + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")
plot_behv(model, "HCT_accuracy", "DT_confidence")
model <- glmmTMB(DT_RT ~ instruction/(condition*HCT_accuracy) + style + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")
plot_behv(model, "HCT_accuracy", "DT_RT")
model <- glmmTMB(DT_confidence ~ instruction/(condition*HCT_awareness) + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")
plot_behv(model, "HCT_awareness", "DT_confidence")
model <- glmmTMB(DT_RT ~ instruction/(condition*HCT_awareness) + style + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")
plot_behv(model, "HCT_awareness", "DT_RT")
model <- glmmTMB(DT_confidence ~ instruction/(condition*MAIA_total) + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")
plot_behv(model, "MAIA_total", "DT_confidence")
model <- glmmTMB(DT_RT ~ instruction/(condition*MAIA_total) + style + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")
plot_behv(model, "MAIA_total", "DT_RT")
model <- glmmTMB(DT_confidence ~ instruction/(condition*lie_ability) + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")
plot_behv(model, "lie_ability", "DT_confidence")
model <- glmmTMB(DT_RT ~ instruction/(condition*lie_ability) + style + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")
plot_behv(model, "lie_ability", "DT_RT")
model <- glmmTMB(DT_confidence ~ instruction/(condition*lie_frequency) + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")
plot_behv(model, "lie_frequency", "DT_confidence")
model <- glmmTMB(DT_RT ~ instruction/(condition*lie_frequency) + style + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")
plot_behv(model, "lie_frequency", "DT_RT")
model <- glmmTMB(DT_confidence ~ instruction/(condition*lie_negativity) + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")
plot_behv(model, "lie_negativity", "DT_confidence")
model <- glmmTMB(DT_RT ~ instruction/(condition*lie_negativity) + style + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")
plot_behv(model, "lie_negativity", "DT_RT")
model <- glmmTMB(DT_confidence ~ instruction/(condition*lie_contextuality) + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")
plot_behv(model, "lie_contextuality", "DT_confidence")
model <- glmmTMB(DT_RT ~ instruction/(condition*lie_contextuality) + style + (1|ID) + (1|item), data = df)
parameters(model, effects = "fixed")
plot_behv(model, "lie_contextuality", "DT_RT")report::cite_packages(sessionInfo())